package revontuli.aMHD;

import revontuli.aMHD.R;
import revontuli.aMHD.R.xml;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.preference.Preference.OnPreferenceClickListener;

public class SettingsAct extends PreferenceActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.settings);
		
		Preference lUpdateNowPref = findPreference("settings_updatenow");
		
		lUpdateNowPref.setOnPreferenceClickListener(new OnPreferenceClickListener() {
			@Override
			public boolean onPreferenceClick(Preference arg0) {
				aMHDApp.mDataManager.updateAllData();
				return false;
			}
			
		});
		
	}
}
